/**
 *
1
1 2 3
2 1 3
2 3 1

 */
#include<stdio.h>

struct A
{
	//占2位
	unsigned char a:2;
	//占3位
	unsigned char b:3;
	//占3位
	unsigned char c:3;
}t2={2,3,1};//3. 定义位域时定义变量

int main(){
	printf("%ld\n", sizeof(struct A));
	//1.先定义变量再赋值
	struct A t;
	t.a = 1;
	t.b = 2;
	t.c = 3;
	printf("%d %d %d\n",t.a, t.b, t.c);

	//2. 定义变量时进行赋值
	struct A t1 = {2,1,3};
	printf("%d %d %d\n",t1.a, t1.b, t1.c);

	//3. 
	printf("%d %d %d\n",t2.a, t2.b, t2.c);
}
